#define _CRT_SECURE_NO_WARNINGS 1
#include <vector>
#include <map>
using namespace std;
class Solution {
public:
    int busyStudent(vector<int>& startTime, vector<int>& endTime, int queryTime)
    {
        map<int, bool> m;
        for (int i = 0;i < startTime.size();i++)
        {
            if (startTime[i] > queryTime)
            {
                m[i] = true;
            }
        }
        int count = 0;
        for (int i = 0;i < endTime.size();i++)
        {
            if (m[i] == false && endTime[i] >= queryTime)
            {
                count++;
            }
        }
        return count;
    }
};